package com.eos.control.action.emp;

import java.util.List;

import com.eos.common.tool.DataCacheUtil;
import com.eos.control.action.base.AbstractBaseAction;
import com.eos.orm.mybatis.model.SysRole;
import com.eos.orm.mybatis.model.SysUser;

public class EditEmpAction extends AbstractBaseAction {
	private static final long serialVersionUID = -98314110671131901L;
	private Integer sysUserId;
	private SysUser user;
	private List<SysRole> roleList;
	
	public void setSysUserId(Integer sysUserId) {
		this.sysUserId = sysUserId;
	}
	
	public SysUser getUser() {
		return user;
	}

	public List<SysRole> getRoleList() {
		return roleList;
	}

	@Override
	public String execute() {
		 try{
			user =  DataCacheUtil.getSysUser(sysUserId);
			roleList = DataCacheUtil.getAllSysRole();
		 }catch(Exception ex){
			 ex.printStackTrace();
		 }
		 return SUCCESS;
	}
}
